/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2019.
 * Description: This file contains driver APIs to the pcie_aer_notifier.
 * Author: zhangwen
 * Create: 2019-09-23
 */

#include <linux/notifier.h>
#include <linux/types.h>

BLOCKING_NOTIFIER_HEAD(aer_notifier_list);
int register_aer_notifier(struct notifier_block *nb)
{
	if (!nb)
		return -EINVAL;

	return blocking_notifier_chain_register(&aer_notifier_list, nb);
}
EXPORT_SYMBOL(register_aer_notifier);

int unregister_aer_notifier(struct notifier_block *nb)
{
	if (!nb)
		return -EINVAL;

	return blocking_notifier_chain_unregister(&aer_notifier_list, nb);
}
EXPORT_SYMBOL(unregister_aer_notifier);
